<template>
	<view class="tmp-box">
		<view class='filterBox'>
			<view class='filter-input'>
				<text style="color: #b8b8b8;"  class="iconfont icon-sousuo filterImg"/>
				<input class="text" type='text' v-model="inputVal" confirm-type="搜索" @confirm='handleFllter' placeholder='搜索'></input>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				inputVal: "",
			};
		},
		methods: {
			handleFllter(e) {
				this.$emit("confirm", e.detail.value)
			},
			clears(){
				this.inputVal=""
				this.$emit('reload')
			}
		},
	}
</script>

<style lang="scss" scoped>
	@import url("../../css/icon.css");
	
	.filterBox {
		padding: 8px 10px;
		background-color: #fff;
		
		.filter-input {
			height: 40px;
			background-color: #eeeff0;
			border-radius: 5px;
			display: flex;
			align-items: center;
			padding-left: 15px;
			
			.filterImg {
				width: 16px;
				height: 16px;
				margin-right: 10px;
			}
			
			.filterImgs {
				width: 16px;
				height: 16px;
				
			}
			
			.text {
				width: 84%;
				background-color: #eeeff0;
				font-size: 16px;
				color: #000;
			}
		}
	}
</style>
